#include "../include/io.h"

void init8259A(void){
    outb(0x21, 0xFF);
    outb(0xA1, 0xFF);

    outb(0x20, 0x11);
    outb(0x21, 0x20);
    outb(0x21,0x04);
#define AUTO_EOI 1
#if AUTO_EOI
    outb(0x21, 0x03);
#else   
    outb(0x21, 0x01);
#endif

    outb(0xA0,0x11);
    outb(0xA1,0x28);
    outb(0xA1,0x02);
    outb(0xA1,0x01);
}